<?php
/**
 * Created by PhpStorm.
 * User: t
 * Date: 2024/3/11
 * Time: 11:28
 */


namespace app\home\model;
use think\Model;


/**
 * @mixin \think\Model
 */
class Config extends Model
{
    protected $name="config";
    public static function getConfigValue($name){
        $data=self::where('key','=',$name)->value('value');
        if(is_null(json_decode($data))){
            return $data;
        }else{
            return  json_decode($data,true);
        }
    }

}
